!
!===========================================================================
!
      subroutine fabort
      implicit     none
      continue
!      return
      end
!
!=================================================================
!
      subroutine clfile (lun)
      implicit none
      integer  lun
      close (lun)
      end
!
!=========================================================================
!
      subroutine byebye
      implicit none
      continue
!      write (6,*)
!      write (6,*) 'good bye.'
!      write (6,*)
!      stop
      end
!
!==========================================================================
!
      subroutine  oops
      implicit     none
      write (*,*)
      write (*,*) 'sorry about that.'
      write (*,*)
      stop
      END
!
!==============================================================================
!
      subroutine infile (lun, file, istat)
      implicit     none
      integer ::     lun	
      character(len=*) :: file
      integer ::     istat
!
!      character(len=100) :: expand

!      open (lun, file=expand(file), status='old', err=999)
      open (lun, file=file, status='old', err=999)
      istat = 0
      return
  999 istat = -1
      return
      end
!
!========================================================
!
!      CHARACTER*(*) FUNCTION EXPAND(FILE)
!      IMPLICIT     NONE
!      CHARACTER*30 FILE
!      INTEGER I
!      INTEGER J
!      INTEGER K
!
!      DO I=2,29
!         IF (FILE(I:I) .EQ. ':') THEN
!            CALL GETENV (FILE(1:I-1), EXPAND)
!            DO J=1,100
!               IF (EXPAND(J:J) .NE. ' ') K=J
!            END DO
!            IF (K .NE. 0) THEN
!               EXPAND = EXPAND(1:K)//'/'//FILE(I+1:30)
!               RETURN
!            END IF
!         END IF
!      END DO
!      EXPAND = FILE
!      RETURN
!      END
!
!======================================================
!
      subroutine outfil (lun, file, istat)
      implicit     none
      integer      lun
      CHARACTER(len=*) :: file
      integer      istat
!      character*30 ANSWER
!      CHARACTER*100 EXPAND
!      LOGICAL EXIST
!
! 1000 INQUIRE (FILE=EXPAND(FILE), EXIST=EXIST)
!      IF (EXIST) THEN
!         CALL STUPID ('This file already exists: '//FILE)
!         ANSWER = 'OVERWRITE'
!         CALL GETNAM ('NEW OUTPUT FILE NAME:', ANSWER)
!         IF (ANSWER .EQ. 'OVERWRITE') THEN
!            OPEN (LUN, FILE=EXPAND(FILE), STATUS='OLD')
!            CLOSE (LUN, STATUS='DELETE')
!         ELSE
!            FILE = ANSWER
!            GO TO 1000
!         END IF
!      END IF
!      open (lun, file=expand(file), status='new', iostat=istat)
      open (lun, file=file, iostat=istat)
!      return
      end
!
!====================================================
!
      CHARACTER*(*) FUNCTION CASE (STRING)
      IMPLICIT      NONE
      CHARACTER*(*) STRING
!
! FOR UNIX, LEAVE THE CASES OF THE CHARACTERS ALONE!
!
      CASE = STRING
      RETURN
      END 
!
!
!====================================================
!
Subroutine ovrwrt(line, iwhich)

character(len=*) :: line
integer :: iwhich

! nothing done
write(*,'(A)',advance='yes') trim(line)

end


!      SUBROUTINE OVRWRT (LINE, IWHICH)
!      IMPLICIT      NONE
!      CHARACTER*(*) LINE
!      INTEGER       IWHICH
!
!     CHARACTER*79 OUTPUT
!      INTEGER LEN
!
!      IF (IWHICH .EQ. 1) THEN
!         WRITE (6,1) LINE
!    1    FORMAT (A)
!      ELSE IF (IWHICH .EQ. 2) THEN
!         IF (LEN(LINE) .LT. 79) THEN
!            OUTPUT = ' '
!            OUTPUT = LINE
!            WRITE (6,2) OUTPUT, CHAR(13)
!            WRITE (6,2) OUTPUT, CHAR(13)
!    2       FORMAT (A, A1, $)
!         ELSE
!            WRITE (6,2) LINE, CHAR(13)
!         END IF
!      ELSE IF (IWHICH .EQ. 3) THEN
!         WRITE (6,3) LINE
!    3    FORMAT (A)
!      ELSE
!         WRITE (6,4) LINE, CHAR(13)
!    4    FORMAT (/A, A1, $)
!      END IF
!      RETURN
!      END
!


